package com.yanqu.road.server.cmd.orewar.cross;

import com.yanqu.road.pb.orewar.OreWarProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.orewar.OreWarMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CROSS_ORE_WAR_BLOWOUT_NOTIFY, desc = "跨服获得冠名发送消息")
public class CrossBlowoutMessageCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		OreWarProto.CrossNotifyBlowoutMessage crossMsg = OreWarProto.CrossNotifyBlowoutMessage.parseFrom(packet.getBytes());
		int activityId = crossMsg.getActivityId();
		int groupId = crossMsg.getGroupId();
		OreWarMgr.sendCrossBlowoutMessage(activityId,groupId);
	}

	@Override
	public void sendData(GamePlayer player) {

	}

}
